package wisents.wicket.element;

import org.apache.wicket.markup.html.basic.Label;
import wisents.api.PageElement;

public final class IsLabelWithValueElementCriteria extends AbstractWicketElementCriteria {

    private final String labelValue;

    public IsLabelWithValueElementCriteria(PageElement pageElement, String value) {
        super(pageElement);
        this.labelValue = value;
    }

    public void validateCriteria() {
        tester.assertComponent(pageElement.path(), Label.class);
        tester.assertLabel(pageElement.path(), labelValue);
    }


}
